$(function() {
	var param = $("#tabContent > .tab-pane.active").data();
	var paramPost={  "dateFrom":param.dateFrom,
			"dateTo":param.dateTo,
			"pardepCode":param.depCode  //所选科室编码
		};
	// 开始查询
	getDepUnderDrgsMedinsQuota(paramPost);
})
/**
 * @ Discription:获取覆盖病组信息
 * @Autor ：liuhongjun
 * @Date  ：2018年12月25日上午11:22:54
 */
function getDepUnderDrgsMedinsQuota(param){
	$.post(contextPath + '/DrgFeeMedins/getDepUnderDrgsMedinsQuota.dhc',param).done(function(result) {
		var data=[];
		if(result.success&& result.data&&result.data.length>0){
			data=result.data;
		}
			var columns = [ {
				"data" : "DRG_DESC",
				"title":"病组",
				"render":function(obj, type, full){
					return full.DRG_CODE+"_"+full.DRG_DESC;
				}
			}, {
				"data" : "TOTALCASECNT",
				"title":"出院病例数"
			}, {
				"data" : "AVGDAYS",
				"title":"平均住院日"
			}, {
				"data" : "AVGFEE",
				"title":"次均费用(元)",
				"render":function(obj, type, full){
					return formatNumber(full.AVGFEE);
				}
			}, {
				"data" : "YINGKUI",
				"title":"盈亏(元)",
				"render":function(obj, type, full){
					return formatNumber(full.YINGKUI);
				}
			}];
		var paramsDataTables = {
				stateSave : true,
				rownumbers : false,
				pageLength : 10,
				searching:true,
				scrollY:'420px',
				order : [ [ 0, "asc" ] ]
			};
		$('#'+tabId+' #dep_quota_drgs').dataTableBasic(columns,data,paramsDataTables);
	});
}
